  {  Petrova Tatjana
     2012/10/07
     This program writes a list.}

program List;

{$APPTYPE CONSOLE}

uses
  SysUtils;
type
  pelement = ^element;
  element = record
    value : integer;
    next : pelement;
  end;
var
  head : pelement;
begin
  new(head);
  head^.value := 5;
  new(head^.next);
  head^.next^.value := 6;
  new(head^.next^.next);
  head^.next^.next^.value := 6;
  head^.next^.next^.next := nil;
end.
